********************************************************************************
*
* Exporting inequality: US investors and the Americanization of executive pay 
* in the United Kingdom
* 
* Lukas Linsi, Jonathan Hopkin & Pascal Jaupart
*
* Review of International Political Economy, DOI: 10.1080/09692290.2021.2004440
*
********************************************************************************

/*
This do-file reproduces the regression tables shown in the RIPE 2021 journal 
article publication based on *DIRECTOR/INDIVIDUAL-level* data.

NB: The remumeration data being confidential, access to the analysis dataset
is not provided. 

Do-file outline:
	1. Data preparation 
	2. Main text regression tables
	3. Appendix tables
	
*/


*****************************************
********** 1. Data preparation **********
*****************************************

***** Loading data
	clear
	set more off
		global root " " // add own path to dataset
		use "$root\director_panel.dta"


***** Sample
	codebook ed
		keep if ed==1 // executive directors only
	
	gen sample_allobs=0
		replace sample_allobs=1 if ed==1 & TotEqAtRisk!=. & Bonus!=. // sample w/o missing values

	
***** Economic sectors
	gen service_finance=0
		replace service_finance=1 if Sector=="Banks"
		replace service_finance=1 if Sector=="Insurance"
		replace service_finance=1 if Sector=="Investment Companies"
		replace service_finance=1 if Sector=="Life Assurance"	
		replace service_finance=1 if Sector=="Private Equity"
		replace service_finance=1 if Sector=="Real Estate"
		replace service_finance=1 if Sector=="Speciality & Other Finance"

	gen service_nonfinance=0
		replace service_nonfinance=1 if Sector=="Business Services"
		replace service_nonfinance=1 if Sector=="Consumer Services"
		replace service_nonfinance=1 if Sector=="Food & Drug Retailers"
		replace service_nonfinance=1 if Sector=="General Retailers"
		replace service_nonfinance=1 if Sector=="Health"
		replace service_nonfinance=1 if Sector=="Leisure & Hotels"
		replace service_nonfinance=1 if Sector=="Media & Entertainment"
		replace service_nonfinance=1 if Sector=="Publishing"
		replace service_nonfinance=1 if Sector=="Software & Computer Services"
		replace service_nonfinance=1 if Sector=="Telecommunication Services"
		replace service_nonfinance=1 if Sector=="Transport"
		replace service_nonfinance=1 if Sector=="Utilities - Other"
		
	gen primaryresources_related=0
		replace primaryresources_related=1 if Sector=="Forestry & Paper"
		replace primaryresources_related=1 if Sector=="Mining"
		replace primaryresources_related=1 if Sector=="Oil & Gas"
		replace primaryresources_related=1 if Sector=="Renewable Energy"
		replace primaryresources_related=1 if Sector=="Tobacco"
		
	gen industry=0
		replace industry=1 if Sector=="Beverages"	
		replace industry=1 if Sector=="Chemicals"	
		replace industry=1 if Sector=="Clothing  Leisure and Personal Products"	
		replace industry=1 if Sector=="Construction & Building Materials"	
		replace industry=1 if Sector=="Containers & Packaging"	
		replace industry=1 if Sector=="Diversified Industrials"	
		replace industry=1 if Sector=="Electricity"	
		replace industry=1 if Sector=="Food Producers & Processors"	
		replace industry=1 if Sector=="Household Products"	

	gen high_tech=0
		replace high_tech=1 if Sector=="Aerospace & Defence"
		replace high_tech=1 if Sector=="Automobiles & Parts"
		replace high_tech=1 if Sector=="Information Technology Hardware"
		replace high_tech=1 if Sector=="Pharmaceuticals and Biotechnology"
		replace high_tech=1 if Sector=="Electronic & Electrical Equipment"	
		replace high_tech=1 if Sector=="Engineering & Machinery"	

	
***** Sector trends
	gen trend = year-2006	
		ta trend
		
	encode Sector, gen(sector)
		codebook sector
		ta sector, gen(sectorid)
		
	foreach var of varlist sectorid1-sectorid39{
		gen `var'_trend = `var'*trend
		}


***** Outcome pay variables
	gen logsalary = ln(Salary)
	gen logbonus = ln(Bonus)
	gen logequity = ln(TotEqAtRisk)	

	gen ihs_salary = log(Salary + sqrt(Salary^2 + 1))
	gen ihs_bonus = log(Bonus + sqrt(Bonus^2 + 1))
	gen ihs_equity = log(TotEqAtRisk + sqrt(TotEqAtRisk^2 + 1))
	gen ihs_totrem = log(TotRemPeriod + sqrt(TotRemPeriod^2 + 1))
	
	
***** Variable labels	

	// Company controls
	label var logoperaterev "Operating revenue (log)"
	label var profitmargin "Profit margin (%)"
	label var solvency "Solvency ratio"
	label var stockprice "Stock price change"
	label var bvdindepcat "BvD independence"
	label var uniondensity "Union density"

	// Director controls
	label var male "Male"
	label var uscitizen "US citizen"
	label var age "Age"
	label var agesq "Age sq."
	
	// Pay variables
	label var ihs_totrem "Executive director total remuneration (log)"
	label var ihs_salary "Salary (log)"
	label var ihs_bonus "Bonus (log)"
	label var ihs_equity "Equity (log)"

	// Ownership
	label var share_foreign "Foreign ownership (%)"
	label var US_shareholdertotal "US ownership (%)"
	label var NON_US_shareholdertotal "Non-US ownership (%)"	


	
****************************************************	
********** 2. Main text regression tables **********
****************************************************

***** Table 4: US ownership and executive pay

	local covars_indiv "male age agesq uscitizen"
	local covars_firm "logoperaterev profitmargin solvency stockprice bvdindepcat uniondensity"
	local sector_trends "sectorid2_trend-sectorid39_trend"

	// Column 1 
	areg ihs_totrem US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' i.year, absorb(BoardID) vce(cluster BoardID) 

	// Column 2 
	areg ihs_totrem US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' `covars_firm' i.year, absorb(BoardID) vce(cluster BoardID) 

	// Column 3
	areg ihs_totrem US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' `covars_firm' `sector_trends' i.year, absorb(BoardID) vce(cluster BoardID) 


***** Table 6: Effect on pay components

	local covars_indiv "male age agesq uscitizen"
	local covars_firm "logoperaterev profitmargin solvency stockprice bvdindepcat uniondensity"
	local sector_trends "sectorid2_trend-sectorid39_trend"

	// Salary - columns 1 and 2
	areg ihs_salary US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' i.year, absorb(BoardID) vce(cluster BoardID) 

	areg ihs_salary US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' `covars_firm' `sector_trends' i.year, absorb(BoardID) vce(cluster BoardID) 
				
	// Bonus - columns 3 and 4
	areg ihs_bonus US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' i.year, absorb(BoardID) vce(cluster BoardID) 

	areg ihs_bonus US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' `covars_firm' `sector_trends' i.year, absorb(BoardID) vce(cluster BoardID) 

	// Equity - columns 5 and 6
	areg ihs_equity US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' i.year, absorb(BoardID) vce(cluster BoardID) 

	areg ihs_equity US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' `covars_firm' `sector_trends' i.year, absorb(BoardID) vce(cluster BoardID) 
	
	
	
****************************************
********** 3. Appendix tables **********
****************************************		
	
***** Table A7: Summary statistics
	
	sum ihs_totrem ihs_salary ihs_bonus ihs_equity ///
		US_shareholdertotal NON_US_shareholdertotal ///
		male age agesq uscitizen ///
		logoperaterev profitmargin solvency stockprice bvdindepcat uniondensity

	estpost summarize ihs_totrem ihs_salary ihs_bonus ihs_equity ///
		US_shareholdertotal NON_US_shareholdertotal ///
		male age agesq uscitizen ///
		logoperaterev profitmargin solvency stockprice bvdindepcat uniondensity

		esttab, cells("count mean sd min max")
		
	
***** Table A11: Sample of CEOs only	

	egen maxpay = max(TotRemPeriod), by(BoardID year)
		gen ceo_var=0
			replace ceo_var=1 if TotRemPeriod==maxpay // CEO identification through highest pay
	
	local covars_indiv "male age agesq uscitizen"
	local covars_firm "logoperaterev profitmargin solvency stockprice bvdindepcat uniondensity"
	local sector_trends "sectorid2_trend-sectorid39_trend"

	// Column 1 
	areg ihs_totrem US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' i.year if ceo_var==1 , absorb(BoardID) vce(cluster BoardID) 

	// Column 2
	areg ihs_totrem US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' `sector_trends' i.year if ceo_var==1 , absorb(BoardID) vce(cluster BoardID) 

	// Column 3
	areg ihs_totrem US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' `covars_firm' i.year if ceo_var==1 , absorb(BoardID) vce(cluster BoardID) 

	// Column 4
	areg ihs_totrem US_shareholdertotal NON_US_shareholdertotal  `covars_indiv' `covars_firm' `sector_trends' i.year if ceo_var==1 , absorb(BoardID) vce(cluster BoardID) 
		
	
	
	// End.	
